module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
    
    const conn = app.mongooseDB.get('db2'); 
   
    const ArticleSchema = new Schema({
      date: String,
    title: String,
    imgSrc: String,
    avatar: String,
    content: String,
    reading: String,
    collectNum: Number,
    headImgSrc: String,
    author: String,
    dateTime: String,
    detail: String,
    postId: Number,
    music: {
        url: String,
        title:String,
        coverImg: String
    },
    collected: Boolean
    });
   
    return conn.model('Article', ArticleSchema,'article');
  }
  